package com.naicha.wechat.wechat.factory.impl;

import com.naicha.wechat.wechat.factory.DynamicMessageBean;
import com.naicha.wechat.wechat.factory.model.ImageMessage;
import com.naicha.wechat.wechat.factory.model.TextMessage;
import com.naicha.wechat.wechat.factory.model.WeChatMessageBase;

import java.util.Map;

/**
 * @author NaiCha
 * @date 2019/5/6 10:10
 * @description TODO
 **/
public class ImageMessageImpl implements DynamicMessageBean {
    @Override
    public WeChatMessageBase getMessageObject(String openID, String type, Map<String,Object> data) {
        ImageMessage imageMessage = new ImageMessage(data);
        imageMessage.setTouser(openID);
        imageMessage.setMsgtype(type);
        return imageMessage;
    }
}
